#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
using namespace std;
int n, k, T;
int main()
{
    cin >> T;
    while (T--)
    {
        cin >> n >> k;
        if (n == 0) cout << "Bob" << endl;
        else if (k % 3 == 0)
        {
            int r = n % (k + 1);
            if (r == 0 || r % 3 == 0 && r % k != 0) cout << "Bob" << endl;
            else cout << "Alice" << endl;
        }
        else
        {
            if (n % 3 == 0) cout << "Bob" << endl;
            else cout << "Alice" << endl;
        }
    }
    return 0;
}